package com.websystique.springsecurity.dao;

import com.websystique.springsecurity.model.SysMenu;
import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository("sysMenuDao")
public class SysMenuDaoImpl extends  AbstractDao<Integer,SysMenu> implements SysMenuDao{
    @Override
    public List<SysMenu> findByMenuFatherId(int menuFatherId) {
        Criteria crit = createEntityCriteria();
        crit.add(Restrictions.eq("menuFatherId", menuFatherId));
        return crit.list();
    }
}
